<template>
  <div>
    <Header />
    <router-view></router-view>
    <Footer v-show="!$route.meta.footerIsHidden"/>
  </div>
</template>

<script>
import { mapActions} from "vuex";
import Header from "@comp/Header";
import Footer from "@comp/Footer";
export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    //获取三级列表
    this.getCategoryList();
  },
  methods: {
     //封装获取三级列表,避免组件复用导致频繁请求
    ...mapActions("home", ["getCategoryList"]),
  },
};
</script>

<style lang="less" scoped>
</style>